import request from '@/utils/request'

export function getUserList(params) {
  return request({
    url: '/admin/auth/admin',
    method: 'get',
    params
  })
}

export function addOneUser(data) {
  return request({
    url: '/admin/auth/admin',
    method: 'post',
    data
  })
}

export function updateOneUser(data) {
  return request({
    url: '/admin/auth/admin',
    method: 'put',
    data
  })
}

export function getUserByID(idObj) {
  const { id } = idObj
  return request({
    url: `/admin/auth/admin/${id}`,
    method: 'get'
  })
}

export function deleteUserByIDs(data) {
  return request({
    url: `/admin/auth/admin`,
    method: 'delete',
    data
  })
}
